﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="VideoPlay.aspx.vb" Inherits="Web_2._0_BMW___X6_Experts_Web_Application.VideoPlay" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">

        .st
        {
            font-size: medium;
        }
        

        .style2
        {
            color: #3399FF;
        }
    
        .style3
        {
            font-size: x-large;
        }
        .videoPlay
        {
            width: 895px;
            height: 50px;
        }
        .mainVideoPlayOnly
        {
            height: 295px;
            width: 651px;
            margin-bottom: 245px;
        }
        .sqlDataS
        {
            height: 353px;
            margin-bottom: 28px;
            width: 922px;
        }
        .videoMainContentPlay
        {
            height: 255px;
            margin-bottom: 2px;
            width: 899px;
        }
        .VideoInfo
        {
            margin-bottom: 27px;
            height: 93px;
            width: 895px;
        }
        .videoInfo1
        {
            height: 298px;
            width: 642px;
        }
        .stats
        {
            height: 497px;
            width: 917px;
            margin-bottom: 0px;
        }
        .listOfVideoComments
        {
            height: 151px;
            width: 921px;
        }
        .clip
        {
            height: 351px;
            width: 895px;
            text-align: center;
        }
        .style6
        {
            font-size: small;
        }
            
        .VideosStats
        {
            height: 119px;
            width: 909px;
            text-align: center;
        }
            
        .div1
        {
            width: 257px;
            height: 103px;
        }
        .div2
        {
            width: 295px;
            height: 103px;
        }
        .div3
        {
            width: 281px;
            height: 103px;
        }
            
        .style7
        {
            text-decoration: underline;
        }
            
        .style8
        {
            font-size: medium;
            text-decoration: underline;
        }
            
        .VideoStatsInfo
        {
            height: 108px;
            width: 762px;
        }
            
        </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class = "style3">
        <strong>BMW - X6 </strong><span class="style2"><em><strong>Videos &amp; Media</strong></em></span><strong> Discussion Forum
        </strong>
    </div>
    <br />
    <div class  = "VideoTasks">
    
        You are currently viewing a video on BMW - X6 Experts from YouTube.
        <br />
        <br />
        Non - Registered users are able to view the video but not comment and tag on 
        them. If you register, you can do many things aswell as post videos.
        <br />
        <br />
        <span class="style6">
    
    
        Click here to <a href = "Account/Register.aspx">Register</a> or <a href = "Account/Login.aspx">Login</a>, 
        Its FREE and EASY to use. </span>
    
    </div>
    <br />

    <div class = "videoPlay">
    
        <asp:FormView ID="FormView1" runat="server" DataSourceID="SqlDataSource1" 
            Height="41px" Width="877px" BorderStyle="Solid" 
            style="font-size: medium; font-family: Calibri;" BackColor="White" 
            BorderColor="#3F3F3F" BorderWidth="4px" CellPadding="3" GridLines="Horizontal">
            <EditItemTemplate>
                <strong>Title:</strong> <asp:TextBox ID="VideoTitleTextBox" runat="server" 
                    Text='<%# Bind("VideoTitle") %>' />
                <br />
                <strong>Video Link:</strong>
           
                <br />
                <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 
                    CommandName="Update" Text="Update" />
                &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" 
                    CausesValidation="False" CommandName="Cancel" Text="Cancel" />
            </EditItemTemplate>
            <EditRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
            <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
            <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
            <InsertItemTemplate>
                <strong>Title:</strong> <asp:TextBox ID="VideoTitleTextBox" runat="server" 
                    Text='<%# Bind("VideoTitle") %>' />
                <br />
                
                <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" 
                    CommandName="Insert" Text="Insert" />
                &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" 
                    CausesValidation="False" CommandName="Cancel" Text="Cancel" />
            </InsertItemTemplate>
            <ItemTemplate>
                <strong>Title:</strong>
                <asp:Label ID="VideoTitleLabel" runat="server" 
                    Text='<%# Bind("VideoTitle") %>' />
                <br />

                

            </ItemTemplate>
            <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
            <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
        </asp:FormView>
        <br />
    
    
    <br />

    </div>

    <div class = "clip">
    <div class = "clip2">
    
    
    </div>
    
    
        <asp:FormView ID="FormView3" runat="server" DataSourceID="SqlDataSource1" 
            Width="875px" BackColor="#B0CAFF" BorderColor="#3F3F3F" 
            BorderStyle="Solid" BorderWidth="6px">
            <EditItemTemplate>
                
                    <iframe width="420" height="315" src="http://www.youtube.com/embed/<%# Eval("VideoLink") %>" frameborder="1"></iframe>
                <br />
                <asp:LinkButton ID="UpdateButton0" runat="server" CausesValidation="True" 
                    CommandName="Update" Text="Update" />
                &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" 
                    CausesValidation="False" CommandName="Cancel" Text="Cancel" />
            </EditItemTemplate>
            <InsertItemTemplate>
                
                    <iframe width="420" height="315" src="http://www.youtube.com/embed/<%# Eval("VideoLink") %>" frameborder="1"></iframe>
                <br />
                <asp:LinkButton ID="InsertButton0" runat="server" CausesValidation="True" 
                    CommandName="Insert" Text="Insert" />
                &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" 
                    CausesValidation="False" CommandName="Cancel" Text="Cancel" />
            </InsertItemTemplate>
            <ItemTemplate>
                
                <iframe width="420" height="315" src="http://www.youtube.com/embed/<%# Eval("VideoLink") %>" frameborder="1"></iframe>
                <br />

            </ItemTemplate>
        </asp:FormView>
    </div>


        <div class = "VideoInfo">
    <div class = "VideoInfo2">
    
            <asp:FormView ID="FormView2" runat="server" DataSourceID="SqlDataSource2" 
                Width="874px" BorderStyle="Solid" BorderWidth="4px" BackColor="White" 
                BorderColor="#DEDFDE" CellPadding="4" Font-Bold="False" ForeColor="Black" 
                GridLines="Vertical">
                <EditItemTemplate>
                    <strong>Description:</strong>
                    <asp:TextBox ID="VideoDescriptionTextBox" runat="server" 
                        Text='<%# Bind("VideoDescription") %>' />
                    <br />
                    <strong>Date Uploaded:</strong>
                    <asp:TextBox ID="DateUploadedTextBox" runat="server" 
                        Text='<%# Bind("DateUploaded") %>' />
                    <br />
                    <strong>Time Uploaded:</strong>
                    <asp:TextBox ID="TimeUploadedTextBox" runat="server" 
                        Text='<%# Bind("TimeUploaded") %>' />
                    <br />
                    <strong>Video Posted by:</strong>
                     <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' />
                    <br />
                    
                    <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 
                        CommandName="Update" Text="Update" />
                    &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" 
                        CausesValidation="False" CommandName="Cancel" Text="Cancel" />
                </EditItemTemplate>
                <EditRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                <FooterStyle BackColor="#CCCC99" />
                <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                <InsertItemTemplate>
                    <strong>Description:</strong>
                    <asp:TextBox ID="VideoDescriptionTextBox" runat="server" 
                        Text='<%# Bind("VideoDescription") %>' />
                    <br />
                    <strong>Date Uploaded:</strong>
                    <asp:TextBox ID="DateUploadedTextBox" runat="server" 
                        Text='<%# Bind("DateUploaded") %>' />
                    <br />
                    <strong>Time Uploaded:</strong>
                    <asp:TextBox ID="TimeUploadedTextBox" runat="server" 
                        Text='<%# Bind("TimeUploaded") %>' />
                    <br />
                    <strong>Video Posted by:</strong>
                     <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' />
                    <br />

                    <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" 
                        CommandName="Insert" Text="Insert" />
                    &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" 
                        CausesValidation="False" CommandName="Cancel" Text="Cancel" />
                </InsertItemTemplate>
                <ItemTemplate>
                    <strong>Description:</strong>
                    <asp:Label ID="VideoDescriptionLabel" runat="server" 
                        Text='<%# Bind("VideoDescription") %>' />
                    <br />
                    <strong>Date Uploaded:</strong>
                    <asp:Label ID="DateUploadedLabel" runat="server" 
                        Text='<%# Bind("DateUploaded") %>' />
                    <br />
                    <strong>Time Uploaded:</strong>
                    <asp:Label ID="TimeUploadedLabel" runat="server" 
                        Text='<%# Bind("TimeUploaded") %>' />
                    <br />
                    <strong>Video Posted by:</strong>
                     <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' />
                    <br />
                    

                </ItemTemplate>
                <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                <RowStyle BackColor="#F7F7DE" />
            </asp:FormView>
    </div>
    
    </div>
    <div class = "VideosStats">
    
    <div class = "VideoStatsInfo">
    <div class = "div3" 
            style="border-style: solid; border-color: #3f3f3f; text-align: center;">
    
                <strong><span class="style8">Total Likes</span></strong><br />
    
                <asp:Image ID="imgLike" runat="server" Height="35px" 
                    ImageUrl="~/Pictures/imgLiked.jpg" style="text-align: center" 
                    Width="55px" />
                <br />
                <asp:Label ID="lblTotalCounts" runat="server" Text="Label" Font-Size="Medium" 
                    BorderStyle="Inset" Width="57px"></asp:Label>
            <br />
            
            
            
    </div>
    <div class = "div1" 
            style="border-style: solid; border-color: #3f3f3f; font-size: medium;">
    
    
    
        <span class="style7"><strong>Total Views</strong></span><br />
        <br />
                <asp:Label ID="lblTotalViews" runat="server" Text="Label" Font-Size="Medium" 
                    BorderStyle="Inset" Width="57px"></asp:Label>
    
    
    
    </div>
    
    </div>
    
    </div>
    
    
    <br />
    
     <br />
    
    
    <br /> <br />
    
    
    <br />
    <br /> <br />
    
    
    <br /> 
    
    
    <br />

    
    <div class = "VideoComments">
    
    <asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource4">
            <AlternatingItemTemplate>
                <span style=""><strong>Comment:</strong>
                <asp:Label ID="CommentBodyLabel" runat="server" 
                    Text='<%# Eval("CommentBody") %>' />
                <br />
                <strong>Date Uploaded:</strong>
                <asp:Label ID="DateUploadedLabel" runat="server" 
                    Text='<%# Eval("DateUploaded") %>' />
                <br />
                <strong>Time Uploaded:</strong>
                <asp:Label ID="TimeUploadedLabel" runat="server" 
                    Text='<%# Eval("TimeUploaded") %>' />
                <br />
                <strong>Comment Posted by:</strong>
                 <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' />
                                <br />
<br /></span>
            </AlternatingItemTemplate>
            <EditItemTemplate>
                <span style=""><strong>Comment:</strong>
                <asp:TextBox ID="CommentBodyTextBox" runat="server" 
                    Text='<%# Bind("CommentBody") %>' />
                <br />
                <strong>Date Uploaded:</strong>
                <asp:TextBox ID="DateUploadedTextBox" runat="server" 
                    Text='<%# Bind("DateUploaded") %>' />
                <br />
                <strong>Time Uploaded:</strong>
                <asp:TextBox ID="TimeUploadedTextBox" runat="server" 
                    Text='<%# Bind("TimeUploaded") %>' />
                <br />
                <strong>Comment Posted by:</strong>
                 <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' />
                <br />
               
                <asp:Button ID="UpdateButton" runat="server" CommandName="Update" 
                    Text="Update" />
                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                    Text="Cancel" />
                <br /><br /></span>
            </EditItemTemplate>
            <EmptyDataTemplate>
                <span>No data was returned.</span>
            </EmptyDataTemplate>
            <InsertItemTemplate>
                <span style=""><strong>Comment:</strong>
                <asp:TextBox ID="CommentBodyTextBox" runat="server" 
                    Text='<%# Bind("CommentBody") %>' />
                <br /><strong>Date Uploaded</strong>
                <asp:TextBox ID="DateUploadedTextBox" runat="server" 
                    Text='<%# Bind("DateUploaded") %>' />
                <br /><strong>Time Uploaded:</strong>
                <asp:TextBox ID="TimeUploadedTextBox" runat="server" 
                    Text='<%# Bind("TimeUploaded") %>' />
                <br /><strong>Comment Posted by:
                <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' />
                <br />VideoID:
                <asp:TextBox ID="VideoIDTextBox" runat="server" Text='<%# Bind("VideoID") %>' />
                <br />
                <asp:Button ID="InsertButton" runat="server" CommandName="Insert" 
                    Text="Insert" />
                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                    Text="Clear" />
                <br /><br /></span>
            </InsertItemTemplate>
            <ItemTemplate>
                <span style=""><strong>Comment:</strong>
                <asp:Label ID="CommentBodyLabel" runat="server" 
                    Text='<%# Eval("CommentBody") %>' />
                <br />
                <strong>Date Uploaded</strong>
                <asp:Label ID="DateUploadedLabel" runat="server" 
                    Text='<%# Eval("DateUploaded") %>' />
                <br />
                <strong>Time Uploaded:</strong>
                <asp:Label ID="TimeUploadedLabel" runat="server" 
                    Text='<%# Eval("TimeUploaded") %>' />
                <br />
               <strong>Comment Posted by:</strong>
               <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' />
                <br />

                
<br /></span>
            </ItemTemplate>
            <LayoutTemplate>
                <div ID="itemPlaceholderContainer" runat="server" style="">
                    <span runat="server" id="itemPlaceholder" />
                </div>
                <div style="">
                    <asp:DataPager ID="DataPager1" runat="server" PagedControlID="ListView1" PageSize="5">
                            
                                <Fields>
                                    <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" 
                                        ShowNextPageButton="False" ShowPreviousPageButton="False" />
                                    <asp:NumericPagerField />
                                    <asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True" 
                                        ShowNextPageButton="False" ShowPreviousPageButton="False" />
                                </Fields>
                            </asp:DataPager>
                </div>
            </LayoutTemplate>
            <SelectedItemTemplate>
                <span style=""><strong>Comment:</strong>
                <asp:Label ID="CommentBodyLabel" runat="server" 
                    Text='<%# Eval("CommentBody") %>' />
                <br />
                <strong>Date Uploaded:</strong>
                <asp:Label ID="DateUploadedLabel" runat="server" 
                    Text='<%# Eval("DateUploaded") %>' />
                <br />
                <strong>Time Uploaded:</strong>
                <asp:Label ID="TimeUploadedLabel" runat="server" 
                    Text='<%# Eval("TimeUploaded") %>' />
                <br />
                <strong>Comment Posted by:</strong>
                 <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' />
                <br />
                
<br /></span>
            </SelectedItemTemplate>
        </asp:ListView>
    
    </div>



      <div class = "sqlDataS">
    
    
        
        <asp:SqlDataSource ID="SqlDataSource4" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
            SelectCommand="SELECT Video_Comments.CommentBody, Video_Comments.DateUploaded, Video_Comments.TimeUploaded, aspnet_Users.UserName, Video_Comments.VideoID, Video_Comments.VideoCommentID FROM (aspnet_Users INNER JOIN Video_Comments ON aspnet_Users.UserId = Video_Comments.UserID) WHERE (Video_Comments.VideoID = ?) ORDER BY Video_Comments.VideoCommentID DESC">
            <SelectParameters>
                <asp:QueryStringParameter Name="?" QueryStringField="id" />
            </SelectParameters>
        </asp:SqlDataSource>
    
    
            <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
                
            SelectCommand="SELECT Videos.VideoDescription, Videos.DateUploaded, Videos.TimeUploaded, aspnet_Users.UserName, Videos.VideoID FROM (Videos INNER JOIN aspnet_Users ON Videos.UsernameID = aspnet_Users.UserId) WHERE (Videos.VideoID = ?)">
                <SelectParameters>
                    <asp:QueryStringParameter Name="?" QueryStringField="id" />
                </SelectParameters>
            </asp:SqlDataSource>
    
    
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
            
            SelectCommand="SELECT VideoTitle, VideoLink FROM Videos WHERE (VideoID = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="VideoID" QueryStringField="id" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    
    
    </div>

    </asp:Content>
